Skip to content

SNOW-2199122 Replace is_datetime64tz_dtype with isinstance to resolve pandas deprecation warning #2431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michaelxfrench
Copy link

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-2199122: pandas DeprecationWarning: is_datetime64tz_dtype is deprecated and will be removed in a future version #2399

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    In my PR, I have replaced the call to pandas.api.types.is_datetime64tz_dtype(df[c]) with isinstance(df[c], pandas.DatetimeTZD) as suggested by the pandas deprecation message.

    I have also made a couple of updates in the documentation bumping the python version in tox calls to the lowest supported python version for the project as mentioned in setup.cfg. There is still one reference to py38 in the pyupgrade section of the .pre-commit-config.yaml which I did not change since it would add more noise to the diffs of this PR, but will happily add it if the reviewers are okay with the additional changes.

Copy link

github-actions bot commented Jul 24, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@michaelxfrench
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@michaelxfrench
Copy link
Author

recheck

@michaelxfrench michaelxfrench changed the title : SNOW-2199122 Replace is_datetime64tz_dtype with isinstance to resolve pandas deprecation warning Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SNOW-2199122: pandas DeprecationWarning: is_datetime64tz_dtype is deprecated and will be removed in a future version
1 participant